home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_076 / include / util.g < prev   
Text File  |  1992-05-06  |  2KB  |  78 lines

  1. type
  2.  
  3.     /* result from the string comparison routine: */
  4.  
  5.     COMPARISON = enum {
  6.     EQUAL,
  7.     LESS,
  8.     GREATER
  9.     };
  10.  
  11.     /* error codes returned by 'IOerror': */
  12.  
  13.     ushort
  14.     CH_OK = 0,        /* no error */
  15.  
  16.     CH_EOF = 1,        /* read past end-of-file indicator */
  17.     CH_CLOSED = 2,        /* use after close */
  18.  
  19.     CH_NONEXIS = 3,     /* file doesn't exist */
  20.     CH_DISKFULL = 4,    /* disk is full; write failed */
  21.     CH_BADSEEK = 5,     /* bad seek call */
  22.  
  23.     CH_MISSING = 6,     /* no data on line */
  24.     CH_BADCHAR = 7,     /* bad character for input conversion */
  25.     CH_OVERFLOW = 8,    /* overflow on numeric conversion */
  26.  
  27.     CH_BADREAD = 9;     /* the system read call failed! */
  28.  
  29. /* result from LineRead when we get end of file: */
  30.  
  31. ulong LINE_EOF = 0xffffffff;
  32.  
  33. extern
  34.  
  35.     CharsLen(*char charsPtr)ulong,
  36.     CharsEqual(*char charsPtr1, charsPtr2)bool,
  37.     CharsCopy(*char dest, source)void,
  38.     CharsCmp(*char charsPtr1, charsPtr2)COMPARISON,
  39.     CharsConcat(*char dest, source)void,
  40.     CharsCopyN(*char dest, source; ulong n)void,
  41.     CharsIndex(*char subject, object)long,
  42.  
  43.     exit(long status)void,
  44.  
  45.     ConvTime(ulong seconds; *char buffer)void,
  46.     CurrentTime()ulong,
  47.  
  48.     GetPar()*char,
  49.     RescanPars()void,
  50.  
  51.     FileCreate(*char fileName)bool,
  52.     FileDestroy(*char fileName)bool,
  53.     FileRename(*char oldName, newName)bool,
  54.  
  55.     RawRead(channel input binary chan; *byte buffer; ulong count)ulong,
  56.     RawWrite(channel output binary chan; *byte buffer; ulong count)ulong,
  57.     LineRead(channel input text chan; *char buffer; ulong count)ulong,
  58.     LineWrite(channel output text chan; *char buffer; ulong count)ulong,
  59.     RandomOut(channel output binary chan)void,
  60.     ReOpen(channel input binary ch1; channel output binary ch2)void,
  61.     SeekIn(channel input binary chan; ulong position)bool,
  62.     SeekOut(channel output binary chan; ulong position)bool,
  63.     TextAppend(channel output text chan)bool,
  64.     GetIn(channel input binary chan)ulong,
  65.     GetOut(channel output binary chan)ulong,
  66.     GetInMax(channel input binary chan)ulong,
  67.     GetOutMax(channel output binary chan)ulong,
  68.     FlushOut(channel output binary chan)void,
  69.  
  70.     Malloc(ulong length)*byte,
  71.     Mfree(*byte region; ulong length)void,
  72.     MerrorSet(bool newFlag)void,
  73.     MerrorGet()bool,
  74.  
  75.     BlockMove(*byte dest, source; ulong count)void,
  76.     BlockFill(*byte dest; ulong count; byte valu)void,
  77.     BlockMoveB(*byte dest, source; ulong count)void;
  78.